package physicsModeler.tests;

import java.util.Vector;

import physicsModeler.EnvironmentFactory;
import physicsModeler.ObjectFactory;
import physicsModeler.environment.DrawEnvironment;

import junit.framework.TestCase;

public class EnvironmentFactoryTest extends TestCase {

	public EnvironmentFactoryTest(String name) {
		super(name);
	}

	public void testGetEnvNames() 
	{
		EnvironmentFactory envFactory = new EnvironmentFactory();
		DrawEnvironment drawEnvironmentObject = null;
		
		try {
			drawEnvironmentObject = (DrawEnvironment)envFactory.createDrawEnvironment("Bar");
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
		assertTrue(drawEnvironmentObject.getName()=="Bar");
	}
	
	public void testLoadClasses()
	{
		EnvironmentFactory envFactory = new EnvironmentFactory();
		int count = 4;
		Vector shapeNames = envFactory.getEnvNames();
		assertTrue(shapeNames.size() == count);
	}

}
